package com.syzg.base.merge.model;

import java.io.Serializable;

public class PersonGroupId implements Serializable{

	private static final long serialVersionUID = 1L;
	private Long groupId;
    private Long personId;
	public PersonGroupId(){
    }

    public PersonGroupId(Long groupId, Long personId){
        this.groupId = groupId;
        this.personId = personId;
    }

    public Long getGroupId(){
        return groupId;
    }

    public void setGroupId(Long groupId){
        this.groupId = groupId;
    }

    public Long getPersonId(){
        return personId;
    }

    public void setPersonId(Long personId){
        this.personId = personId;
    }

    public boolean equals(Object other){
        if(this == other)
            return true;
        if(other == null)
            return false;
        if(!(other instanceof PersonGroupId))
            return false;
        PersonGroupId castOther = (PersonGroupId)other;
        return (getGroupId() == castOther.getGroupId() || getGroupId() != null && castOther.getGroupId() != null && getGroupId().equals(castOther.getGroupId())) && (getPersonId() == castOther.getPersonId() || getPersonId() != null && castOther.getPersonId() != null && getPersonId().equals(castOther.getPersonId()));
    }

    public int hashCode(){
        int result = 17;
        result = 37 * result + (getGroupId() != null ? getGroupId().hashCode() : 0);
        result = 37 * result + (getPersonId() != null ? getPersonId().hashCode() : 0);
        return result;
    }
}